package com.bank.mapper;

import com.bank.model.TbAmount;
import org.apache.ibatis.annotations.Param;

public interface TbAmountMapper {
    int deleteByPrimaryKey(Long id);

    int insert(TbAmount record);

    int insertSelective(TbAmount record);

    TbAmount selectByPrimaryKey(Long id);

    TbAmount selectByUserId(Long userId);

    int updateByPrimaryKeySelective(TbAmount record);

    int updateByPrimaryKey(TbAmount record);

    int increaseAmount(@Param("userId") Long userId, @Param("increase") Long increase);

    int decreaseAmount(@Param("userId") Long userId, @Param("decrease") Long decrease, @Param("originAmount") Long originAmount);
}